---
title: 'Directory picker dialog'
sidebarTitle: 'Directory picker'
description: 'Open a folder picker dialog in a Kotlin Multiplatform project'
---

<Check>Supported on Android, iOS, macOS and JVM targets</Check>

## Quick start

Easily open a folder picker dialog to let users select a directory.

<CodeGroup>
```kotlin filekit-dialogs
val directory = FileKit.openDirectoryPicker()
```

```kotlin filekit-dialogs-compose
val launcher = rememberDirectoryPickerLauncher { directory ->
    // Handle the directory
}

Button(onClick = { launcher.launch() }) {
    Text("Pick a directory")
}
```
</CodeGroup>

## Customizing the dialog

You can customize the dialog by setting the title and the initial directory.

<CodeGroup>
```kotlin filekit-dialogs
val directory = FileKit.openDirectoryPicker(
    title = "Directory picker",
    directory = PlatformFile("/custom/initial/path"),
    dialogSettings = dialogSettings,
)
```
```kotlin filekit-dialogs-compose
val launcher = rememberDirectoryPickerLauncher(
    title = "Directory picker",
    directory = PlatformFile("/custom/initial/path"),
    dialogSettings = dialogSettings,
) { directory ->
    // Handle the directory
}
```
</CodeGroup>

Read more about [dialog settings](/dialogs/dialog-settings) to customize the dialog for each platform.

<Note>
  **macOS System Appearance**

  On macOS, to ensure the directory picker dialog uses the system's theme (light or dark), you may need to set a system property at the start of your application:

  ```kotlin
  System.setProperty("apple.awt.application.appearance", "system")
  ```

  This is typically done in your `main` function, before the application window is created.
</Note>
